package com.example.demo.entity;

import java.io.Serializable;
import java.util.Objects;

public class Nation implements Serializable {
    private Integer nid;
    private String nname;

    public Nation(Integer nid, String nname) {
        this.nid = nid;
        this.nname = nname;
    }

    public Nation() {
    }

    public Integer getNid() {
        return nid;
    }

    public void setNid(Integer nid) {
        this.nid = nid;
    }

    public String getNname() {
        return nname;
    }

    public void setNname(String nname) {
        this.nname = nname;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Nation nation = (Nation) o;
        return Objects.equals(nid, nation.nid) && Objects.equals(nname, nation.nname);
    }

    @Override
    public int hashCode() {
        return Objects.hash(nid, nname);
    }

    @Override
    public String toString() {
        return "Nation{" +
                "nid=" + nid +
                ", nname='" + nname + '\'' +
                '}';
    }

}
